home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: Limit on #bytes inside of struct?
- Date: 9 Feb 96 14:12:16 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.823875136@rscernix>
- References: <4feg1d$d4g@cville-srv.wam.umd.edu>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <4feg1d$d4g@cville-srv.wam.umd.edu> jsquires@wam.umd.edu (jeffrey d squires) writes:
-
- >I have the following:
- >
- >typedef struct {
- > int zero;
- > int one;
- > int two;
- > int three;
- > int four;
- > int five;
- > int six;
- > int seven_or_more;
- >} hist_type;
- >
- >hist_type histogram;
- >int num=2;
- >
- >histogram.zero = 0;
- >histogram.one = 0;
- >histogram.two = 0;
- >histogram.three = 0;
- >histogram.four = 0; /* at this point, value of num changes from 2 to 0!!!*/
- >
- >Is there a limit on the number of bytes allowed inside of a struct?
-
- No.
-
- >I am positive that the value of num changes from 2 before the last
- >assignment to 0 after it. Any ideas? Is this a bug in gcc? Unix?
-
- Please post a _complete_ but minimal program which reproduces your
- problem, mentioning your platform, so that we can have a look at it.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-